home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
WarriorsProgress.sit
/
Warrior’s Progress
/
source code
/
Source
/
Libraries
/
Debug
/
Assert.cp
next >
Wrap
Text File
|
1997-06-28
|
642b
|
35 lines
// Assert.cp
#ifndef Assert_h
#include "Assert.h"
#endif
#ifndef ConstCString_h
#include "ConstCString.h"
#endif
static const int8 *PathTail( const int8 *path )
{
const int8 *tail = path;
for ( const int8 *p = path; *p!= 0; p++ )
if ( *p == ':' )
tail = p + 1;
return tail;
}
DebugMessage AssertionMessage( const int8 *file,
uint32 line,
const int8 *condition )
{
DebugMessage message;
message += "\pAssertion failure at line ";
message += line;
message += "\p of ";
message += ConstCString( PathTail( file ) );
message += "\p: ";
message += ConstCString( condition );
return message;
}